﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="module.ascx.cs" Inherits="ExtraClub.Web.Controls.mailer_grid.module" %>
<div id="mailer-grid">
    <table>
        <thead>
            <tr>
                <th>
                    <%=UIText["select-item-th"]%>
                </th>
                <th>
                    <%=UIText["from-th"]%>
                </th>
                <th>
                    <%=UIText["subject-th"]%>
                </th>
                <th>
                    <%=UIText["to-th"]%>
                </th>
                <th>
                    <%=UIText["atempt-number-th"]%>
                </th>
                <th>
                    <%=UIText["last-atempt-th"]%>
                </th>
                <th>
                    <%=UIText["sent-th"]%>
                </th>
                <th>
                    <%=UIText["suspended-th"]%>
                </th>
                <th>
                    <%=UIText["created-th"]%>
                </th>
            </tr>
        </thead>
        <tbody>
            <%list.ForEach(delegate(VwMailJob item) {
                  string from = "";
            %>
            <tr id="row-<%=item.Id %>" class="<%=(list.IndexOf(item) + 1) % 2 == 0?"alter-row":"" %>">
                <td>
                    <span class="uncheck has-layout">
                        <%=UIText["unselect-label"]%></span>
                    <input class="select has-layout" type="radio" name="select" value="<%=item.Id %>" />
                </td>
                <td>
                    <%=item.EmailFrom%>
                </td>
                <td>
                    <%=item.Subject%>
                </td>
                <td>
                    <%=item.EmailTo%>
                </td>
                <td>
                    <%=item.AttemptNumber%>
                </td>
                <td>
                    <%=item.LastAttemptDate.HasValue?((DateTime)item.LastAttemptDate).ToString("yyyy.MM.dd hh:mm:ss"):""%>
                </td>
                <td>
                    <%=item.Sent.HasValue ? ((DateTime)item.Sent).ToString("yyyy.MM.dd hh:mm:ss") : ""%>
                </td>
                <td>
                    <input type="checkbox" value="<%=item.Suspended?"checked":""%>" />
                </td>
                <td>
                    <%=((DateTime)item.Created).ToString("yyyy.MM.dd hh:mm:ss")%>
                </td>
            </tr>
            <%}); %>
        </tbody>
    </table>
    <div id="message">
        <div>
<%--            <%=list[0].Message %>
--%>        </div>
    </div>
</div>
